<template>
  <div>
    <el-timeline>
      <el-timeline-item
        v-for="(activity, index) in activities"
        :key="index"
        color="#1990FE"
        :timestamp="activity.createTime | formatTimer">
        {{activity.statusTypeName}}<span v-if="activity.statusName">， 等级：【{{activity.statusName}}】</span>
      </el-timeline-item>
    </el-timeline>
  </div>

</template>
<script>
  import {
    getSlopeStatus,
  } from '@/services/model/road-mgmt'
  import Format from '@/utils/format'
  export default {
    props: ['value','id'],
    data() {
      return {
        activities:[]
      }
    },
    methods: {
      async getInvestigateOperation(id){
        this.activities = []
        let {data} = await  getSlopeStatus({id:id})
        this.activities = data || []
        return true
      }
    },
    mounted() {
    },
    created() {
    },
    activated() {
    },
    computed: {
    },
    filters:{
      // 时间格式化
      formatTimer(timer) {
        if (timer) {
          return Format(new Date(timer), 'yyyy-MM-dd')
        }
        return ''
      },
    }


  }
</script>

<style lang="less">

</style>
